package com.example.smarqueeview

import android.content.Context
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding
import com.elvishew.xlog.LogLevel
import com.elvishew.xlog.XLog
import skin.support.annotation.Skinable

@Skinable
abstract class BaseActivity<VB : ViewBinding?> : AppCompatActivity() {
    protected var viewBinding: VB? = null
    override fun attachBaseContext(newBase: Context) {
        super.attachBaseContext(newBase)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val enableBind = savedInstanceState?.getBoolean("enable_bind", true) ?: true
        if (enableBind) {
            viewBinding = ViewBindingHelper.injectViewBinding(this)
        }
    }

}